//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package messages;

import common.ByteStream;

public class ChangeFarmName extends Base {
    public static final int MsgType = 14109;
    private final String farmName;
    private static final int MaxChars = 25;

    public ChangeFarmName(String farmName) {
        super(14109);
        if(farmName.length() > 25) {
            farmName = farmName.substring(0, 25);
        }

        this.farmName = farmName;
    }

    public void encode(ByteStream stream) {
        stream.writeString(this.farmName);
    }

    public void decode(ByteStream stream) {
    }

    public String toString() {
        return "  Change farm name request: [ Name: " + this.farmName + " ]";
    }
}
